1. Field of the Invention
The present invention relates to a method and an apparatus for processing a multimedia bitstream. More particularly, the present invention relates to a method and an apparatus for processing a multimedia bitstream comprising a plurality of Network Abstraction Layer (NAL) units.
2. Descriptions of the Related Art
The H.264 standard is one of the newest video coding standards. The H.264 standard outperforms the earlier MPEG-4 and H.263 standards in terms of compression performance, in addition to supporting network-friendly video coding/transmission. The network Abstraction Layer (NAL) units play an important role in the H.264 standard for superior performance.
There are two different approaches to pack NAL units: one is the byte-stream-oriented approach and the other is the packet-oriented approach. In the byte-stream-oriented approach, the start code prefixes are used so that the boundaries of the NAL units can be easily identified. In the packet-oriented approach, there is no start code prefix. The ISO Base Media File Format (e.g., MP4, MJ2) uses the packet-oriented approach to pack NAL units. For the bitstream that conforms to the ISO Base Media File Format, the coded data is carried in payloads of the bitstream. There is no start code prefix in the payloads to indicate the boundaries of the NAL units.
Traditionally, the decoder decodes the bitstream conforming to the ISO Base Media File Format by parsing the payloads. To parse the payload, the decoder has to be equipped with a counter. The header of the corresponding payloads records the number of bytes comprised in the payloads. Therefore, with the assistance of the counter, the decoder can parse according to the number of byes to derive the NAL units.
The performance of processing the packet-oriented bitstream such as a bitstream conforming to the ISO Base Media File Format is usually not satisfied for several reasons. First, an apparatus has to be equipped with an extra memory for storing the byte sizes of NAL units and a byte counter, which increases the hardware complexity and production cost. Additionally, the performance of error concealment is not satisfied because it is difficult for the decoder to skip the error portion and identify the next slice by locating the next NAL unit.
According to the aforementioned description, there is a need to improve the performance of processing the bitstream that packs NAL units by using the packet-oriented approach.